using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace EVDashboard
{
    public partial class AlertForm : Form
    {
        private MainForm m_parent;

        List<string> MyList = new List<string>();
        public void AddAlert(BmsAlert NewAlert)
        {
             AlertList.Items.Add(NewAlert.Notice);
             AlertList.Update();
            
        }

        public AlertForm(MainForm form1)
        {
            InitializeComponent();
            m_parent = form1;
  //          AlertList.Items.Add("1234");
//            List<string> MyAlerts = new List<string>();
//            MyAlerts = m_parent.GetAlertList();
//            for (int x = 0; x < MyAlerts.Count; x++)
 //           {
 //              AlertList.Items.Add(MyAlerts[x]);
 //           }
            AlertList.Update();
            
        }

        private void AlertList_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void ClearAlertButton_Click(object sender, EventArgs e)
        {
            if (AlertList.Items.Count > 0)
            {
                AlertList.Items.RemoveAt(0);
                AlertList.Update();
            }
        }
    }
}